#include<stdio.h>

int main(int argc, char *argv[]){
    /** 
     *文件打开 
     */

    char * filename = "test.txt";
    FILE *fp = fopen(filename, "w");
    if (fp == NULL)
    {
        printf("Can't open file %s\n", filename);
        return -1;
    }
    printf("Open file %s\n", filename);

    int result =fclose(fp);
    if (result == 0)
    {
        printf("Close file %s\n", filename);
    }else{
            printf("Can't close file %s\n", filename);
    }
    
    
    return 0;
}